package persistence;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import pandora.box.usuario.Usuario;


public class GerarTabelas {
	public static void main(String args[]){
		
		AnnotationConfiguration conf = new AnnotationConfiguration()
		.configure("persistence/hibernate.cfg.xml");
		conf.addAnnotatedClass(Usuario.class);
		
		SchemaExport sE = new SchemaExport(conf);
		sE.create(true, true);
		
		System.out.println("Tabela "+Usuario.class.getName()+" foi criada." );
		
		/**
		AnnotationConfiguration confuf = new AnnotationConfiguration()
		.configure("persistence/hibernate.cfg.xml");
		conf.addAnnotatedClass(UF.class);
		
		SchemaExport sEuf = new SchemaExport(confuf);
		sEuf.create(true, true);
		
		System.out.println("Tabela "+UF.class.getName()+" foi criada." );		**/
	}
}
